from typing import List

stest = ["h", "e", "l", "l", "o"]


# def reverse(self, chars):
#     if chars is None or len(chars) == 0:
#         return None
#     l = 0
#     r = len(chars) - 1
#     while l < r:
#         temp = chars[l]
#         chars[l] = chars[r]
#         chars[r] = temp
#         l += 1
#         r -= 1
#     return chars

class Solution:
    def reverseString(self, s: List[str]) -> None:
        if s is None or len(s) == 0:
            return None
        l = 0
        r = len(s) - 1
        while l < r:
            temp = s[l]
            s[l] = s[r]
            s[r] = temp
            l += 1
            r -= 1
        return s


# 类初始化
res = Solution()
print(res.reverseString(stest))